<template>
  <div class="option">
    <div class="goods" v-for="(item, index) in listArr" :key="index">
      <h4>{{ item.name }}</h4>
      <span class="quan" v-for="(itemq, indexq) in item.quan" :key="indexq">
        {{ itemq }}
      </span>
      <div class="price_f">
        <span>
          <img
            v-for="(itemi, indexi) in item.pic"
            :key="indexi"
            :src="itemi"
            alt=""
          />
        </span>
        <div class="price">
          <span>￥{{ item.price }}</span>
          <span>共{{ item.num }}件</span>
        </div>
      </div>
      <span class="onather">再来一单</span>
    </div>
  </div>
</template>
  
  <script>
export default {
  data() {
    return {
      listArr: [
        {
          name: "纯手工饺子（凤域九路店",
          quan: ["10减3", "25减10", "50减21"],
          pic: [
            "https://img2.baidu.com/it/u=114239788,2735925309&fm=253&fmt=auto&app=138&f=JPEG?w=678&h=478",
            "https://img1.baidu.com/it/u=1770193123,2428844636&fm=253&fmt=auto&app=138&f=JPEG?w=719&h=436",
            "https://img1.baidu.com/it/u=101890658,132060832&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=333",
          ],
          price: 17.8,
          num: 2,
        },
        {
          name: "纯手工饺子（凤域九路店",
          quan: ["10减3", "25减10", "50减21"],
          pic: [
            "https://img1.baidu.com/it/u=1770193123,2428844636&fm=253&fmt=auto&app=138&f=JPEG?w=719&h=436",
            "https://img1.baidu.com/it/u=101890658,132060832&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=333",
          ],
          price: 17.8,
        },
        {
          name: "纯手工饺子（凤域九路店",
          quan: ["10减3", "25减10", "50减21"],
          pic: [
            "https://img1.baidu.com/it/u=101890658,132060832&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=333",
          ],
          price: 17.8,
        },
      ],
    };
  },
};
</script>
  
  <style lang="scss" scoped>
option {
  width: 100%;
}
.goods {
  margin: 10px auto;
  border-radius: 5px;
  padding: 10px;
  width: 92%;
  background-color: #eee;
}
.goods .quan {
  color: coral;
  border: 1px solid coral;
  border-radius: 3px;
  font-size: 12px;
  line-height: 30px;
  margin: 0px 5px;
}
.price_f {
  display: flex;
  justify-content: space-between;
}
.price_f img {
  width: 60px;
  height: 60px;
  padding: 5px;
  border-radius: 10px;
}
.price_f .price {
  display: flex;
  flex-direction: column;
}
.onather {
  padding: 3px 8px;
  font-size: 14px;
  color: deepskyblue;
  border: 1px solid deepskyblue;
  border-radius: 15px;
  /* margin: 10px 10px; */
  margin-left: 260px;
}
</style>